from selenium.webdriver.common.by import By


class AdminTicketLocator:
    # Ticket tab
    ticket_tab = (By.XPATH, "//div[contains(@data-menu-id,'TICKET')]")
    # Team tickets tab
    team_tickets_tab = (By.CSS_SELECTOR, '[path="/console/tickets/teamTicket"]')
    # Tickets report tab
    tickets_report_tab = (By.CSS_SELECTOR, '[path="/console/tickets/ticketReport"]')
    # Dashboard菜单
    dashboard_tab = (By.XPATH, "//div[contains(@data-menu-id,'DASHBOARD')]")
    # Bill菜单
    bill_tab = (By.XPATH, "//div[contains(@data-menu-id,'BILL')]")

    # tickets report页面

    # overview部分的数据项
    overview_items = ()
    # overview部分的数据项的标题
    overview_item_titles = (By.XPATH, "//div[contains(@class, 'card-contend-up')]")
    # 滚动栏
    slide = (By.XPATH, "//div[starts-with(@class, 'slide')]")
    # detail列表字段
    detail_columns = (By.CSS_SELECTOR, "th.antd4-table-cell")
    # 时间输入框
    start_time_input = (By.XPATH, "//input[@id='date']")
    end_time_input = (By.XPATH, "//input[@placeholder='End Date']")
    # account email/support team输入框
    name_input = (By.CSS_SELECTOR, "input#name")
    # 查询按钮
    query_button = (By.XPATH, "//button[contains(@class, 'antd4-input-search-button')]")
    # next按钮
    next_button = (By.XPATH, "//div[contains(@class, 'next')]")

    # email列
    email_values = (By.XPATH, "//tr[contains(@class, 'antd4-table-row')]/td[2]")
    # team列
    team_values = (By.XPATH, "//tr[contains(@class, 'antd4-table-row')]/td[3]")

    # 下载ticket report
    download_ticket_report_button = (By.XPATH, "//span[@aria-label='download']/..")

    # empty table
    empty_table = (By.XPATH, "//div[@class='antd4-empty-description']")

    # notification template
    data_deletion_menu = (By.XPATH, "//div[text()='Data Deletion']/..")
    # notification tempalate菜单
    notification_template_tab = (By.CSS_SELECTOR, '[path="/console/messageCenter/template"]')
    # 可点击的send按钮
    template_active_send = (By.XPATH, "(//span[text()='Send']/..)[not(@disabled)]")
    # 发送时间为具体时间选项
    template_specific_send_time = (By.XPATH, "//span[text()='Specific Send Time']")
    # 编辑确认按钮
    template_edit_confirm = (By.XPATH, "//span[text()='OK']/..")
    # 空发送时间报警
    template_empty_sendtime_alert = (By.XPATH, "//div[text()='Please select send time.']")
    # user type selector
    user_type_selector = (By.XPATH, "//span[text()='Please Select']/../..")
    user_type_selector_option = (By.XPATH, "//div[contains(@class, 'antd4-select-item-option-content')]/..")

    # 时间选择器
    template_specific_time_selector = (By.XPATH, "//input[@placeholder='Please Select']")
    # 当前日期
    template_specific_time_selector_today = (By.XPATH, "//td[contains(@class, 'antd4-picker-cell-today')]")
    template_specific_time_selector_confirm = (By.XPATH, "//li/button[contains(@class, 'antd4-btn-primary')]")

    # template table template_name
    template_name = (By.XPATH, "//tbody/tr/td[2]/a")
    # template详情Send History tab
    template_detail_send_history_tab = (By.XPATH, "//div[@role='tab' and text()='Send History']")
    # thead
    thead_item = (By.XPATH, "//thead/tr/th")

    # 成功气泡提示
    success_pup = (By.XPATH, "//div[contains(@class, 'antd4-message-notice-content')]")